#ifndef SONGINFO_H_
#define SONGINFO_H_

#include <qstring.h>

class SongInfo
{
  public:
    SongInfo(void)
        {
            m_name  = "";
            m_title = "";
            m_filepath = "";
            m_containerpath  = "";
            m_type  = "";
        }
    SongInfo(const QString& name, const QString& filepath)
        {
            m_name  = name;
            m_title = "";
            m_filepath = filepath;
            m_containerpath  = "";
            m_type  = "";
        }
    SongInfo(const SongInfo &lhs)
        {
            m_name = lhs.m_name;
            m_title = lhs.m_title;
            m_filepath = lhs.m_filepath;
            m_containerpath = lhs.m_containerpath;
            m_type  = lhs.m_type;

        }

    virtual ~SongInfo() {}

    QString getName() const { return m_name; }
    void setName(const QString &name) { m_name = name; }

    QString getTitle() const { return m_title; }
    void setTitle(const QString &title) { m_title = title; }

    QString getFilePath() const { return m_filepath; }
    void setFilePath(const QString &path) { m_filepath = path; }

    bool isContainer() const { return !m_containerpath.isEmpty();  }
    QString getContainerPath() const { return m_containerpath; }
    void setContainerPath(const QString &path) { m_containerpath = path; }

    QString getType() const { return m_type; }
    void setType(const QString &type) { m_type = type; }

    QString getExtension();

    virtual void setField(QString field, QString data);
    virtual void fillData();

    QString getTitle();
    void parseFilename(QString parsestr);

  protected:
    QString m_name;
    QString m_title;
    QString m_filepath;
    QString m_containerpath;
    QString m_type;
};

bool operator==(const SongInfo& a, const SongInfo& b);

#endif
